function parseUrl(url) {
  // let index = url.indexOf('?')
  // let sub = url.substr(index + 1)
  let subStr = url.split('?')[1]
  let arr = subStr.split('&')
  let result = {}
  arr.forEach(element => {
    let subArr = element.split('=')
    result[subArr[0]] = subArr[1]
  });
  console.log(result);
}
parseUrl('http://www.baidu.com:90/search?name=jiffy&age=21')
